# Maintainer: Brandon Boese <brandonboese@protonmail.com>
pkgname=lomiri-indicator-location
pkgver=0_git20231227
pkgrel=0
_commit=f0525a93eb7b3f7da824459deb2244846d967ab5
pkgdesc="Indicator controlling access to physical location data"
url="https://gitlab.com/ubports/development/core/indicator-location"
arch="all !armhf" # blocked by qt5-qtdeclarative
license="GPL-3.0-only"
source="https://gitlab.com/ubports/development/core/indicator-location/-/archive/$_commit/indicator-location-$_commit.tar.gz
	0001-manually-disable-tests.patch
	"
makedepends="
	cmake-extras
	glib-dev
	gmenuharness-dev
	gmock
	gtest-dev
	intltool
	libqtdbusmock
	libqtdbustest
	lomiri-api-dev
	lomiri-app-launch-dev
	lomiri-url-dispatcher-dev
	qt5-qtdeclarative-dev
	qt5-qttools
	samurai
	"
checkdepends="py3-dbusmock"
builddir="$srcdir/indicator-location-$_commit"
options="!check" # requires Ubuntu gtest
subpackages="$pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=ON \
		-DCMAKE_BUILD_TYPE=None
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
743ff6fc676f68d58b5f2e864072a3469638839cd50c7a6aa0f950934f19f0b03ff1918a32c49a20fec586effbada0f393f5f69a288aeaafc9294938e952764d  indicator-location-f0525a93eb7b3f7da824459deb2244846d967ab5.tar.gz
02a51e168fb3f857905ffc4d47c20f8b3e740177f19d5277f16df54dcc8a7b0fb969724d91379e6ca9e570c8a0bca0d353dac72c2d6a3a38c222052a68a17b85  0001-manually-disable-tests.patch
"
